<?php

namespace App\Http\Controllers;


use http\Env\Request;
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('index');
});

Route::get('ranking', function () {
    return view('ranking');
});
Route::get('creat-page', function () {
    return view('creat-page');
});
Route::get('search-page', function () {
    return view('search-page');
});
Route::get('information', function () {
    return view('information');
});
Route::get('login', function () {
    return view('login');
});
Route::get('setting', function () {
    return view('setting');
});
Route::get('view', function () {
    return view('view');
});
Route::get('show', function () {
    return view('show');
});

Route::group(["prefix" => 'admin',], function () {
    Route::get('/', function () {
        return view('admin.index');
    });
    Route::get('/default', function () {
        return view('admin.default');
    });
    Route::get('/Label', function () {
        return view('admin.Label');
    });
    Route::get('/Rotation', function () {
        return view('admin.Rotation');
    });
    Route::get('/user', function () {
        return view('admin.user-manage');
    });
});


//魏子超
Route::get('user/home', 'user\UserController@home');

Route::post('user/login', 'user\UserController@login');

Route::get('user/loginOut', 'user\UserController@loginout');
Route::post('user/modifypassword', 'user\UserController@modifypassword');
Route::get('user/getUserInfo', 'user\UserController@getUserInfo');
Route::post('user/updateUsername', 'user\UserController@updateUsername');

//前台接口
//张茂林
Route::any('/getSpecialColumn', 'outline\ViewTheArticle@SpecialColumn'); //获取专栏的信息      !
Route::any('/getConterntMessage ', 'outline\ViewTheArticle@ConterntMessage'); //获取所有的文章     !
Route::any('/getColumnMessage', 'outline\ViewTheArticle@getColumnMessage'); //获取文章的内容      !
Route::post('/postThumbs', 'outline\ViewTheArticle@Thumbs'); //点赞次数与增加积分
Route::post('/postCancelThumbs', 'outline\ViewTheArticle@CancelThumbs'); //取消点赞与减少积分
Route::get('/getHotContents', 'outline\ViewTheArticle@getHotContents'); //获取热点文章
Route::get('/getNewContents', 'outline\ViewTheArticle@getNewContents'); //获取最新的文章


//仇政永
Route::get('post/getAllArticle', 'Post\PostController@getAllArticle'); //获取用户的所有文章      !
Route::get('post/getStatusArticle', 'Post\PostController@getStatusArticle'); //查看用户的某个状态下的所有文章         !
Route::post('post/UpdateArticle', 'Post\PostController@UpdateArticle'); //修改并发布用户的某篇文章(需要将状态改为1)
Route::get('post/getAllArticleCount', 'Post\PostController@getAllArticleCount'); //获取用户的所有文章的总数             !
Route::get('post/getStatusArticleCount', 'Post\PostController@getStatusArticleCount'); //获取用户的某个状态的文章的数量
Route::post('post/Drafts', 'Post\PostController@Drafts'); //存为草稿(需要将状态改为3)
Route::get('post/getOwnArticle', 'Post\PostController@getOwnArticle'); //查看自己的文章        !
Route::get('post/DeleteDrafts', 'Post\PostController@DeleteDrafts'); //删除草稿          !

//向良峰
Route::post('/Article/search', 'Article\ArticleController@searchForArticles'); //搜索文章
Route::get('/Article/getColumns', 'Article\ArticleController@getColumns'); //获取所有专栏信息            !
Route::post('/Article/getColumnById', 'Article\ArticleController@getColumnById'); //通过专栏Id获取专栏信息
Route::post('/Article/getTagsById', 'Article\ArticleController@getTagsByColumnId'); //获取专栏下的所有标签
Route::post('/Article/createArticle', 'Article\ArticleController@createArticle'); //创建文章
Route::post('/Article/saveAsDraft', 'Article\ArticleController@saveAsDraft'); //存为草稿

//刘志伟
Route::get('ranginglist/getProjectMessage', 'RangingList\RangingListController@getProjectMessage'); //获取排行的基本信息             !
Route::get('ranginglist/operationProjectMessage', 'RangingList\RangingListController@operationProjectMessage'); //查询用户所有发布的文章信息         !
Route::post('ranginglist/sendGeneral', 'RangingList\RangingListController@sendGeneral'); //获取反馈信息
Route::post('ranginglist/searchingGeneral', 'RangingList\RangingListController@searchingGeneral'); //查询具体用户的信息

//李磊
Route::get('/message/link', 'Message\MessageController@getLikeInfo'); //获取用户获得的点赞信息*
Route::get('/message/integral', 'Message\MessageController@getIntegralInfo'); //获取用户获得的积分变化信息
Route::get('/message/audit', 'Message\MessageController@getAuditInfo'); //获取用户文章审核信息
Route::get('/message/feedbcak', 'Message\MessageController@getFeedbcakInfo'); //反馈信息获取
Route::get('/message/allnum', 'Message\MessageController@messageAllNum'); //全部信息统计
Route::get('/message/noreadnum', 'Message\MessageController@messageUnreadNum'); //未读信息统计
Route::get('/message/linknoread', 'Message\MessageController@getLikeNoread'); //获取点赞信息未读
Route::get('/message/integralnoread', 'Message\MessageController@getIntegralNoread'); //获取用户积分变动未读
Route::get('/message/auditnoread', 'Message\MessageController@getAuditNoread'); //获取用户文章审核未读
Route::get('/message/feedbcaknoread', 'Message\MessageController@getFeedbcakNoread'); //反馈信息未读
Route::get('/message/switchread', 'Message\MessageController@SwitchRead'); //切换已读信息
Route::get('/post/search','Post\SearchController@searchPost'); //搜索文章


//吕永杰
Route::post('/addtags', 'admin\Tags_mangement@addtags'); //增加标签
Route::post('/modifylabel', 'admin\Tags_mangement@modifylabel'); //修改标签
Route::delete('/deletelabel/{id}', 'admin\Tags_mangement@deletelabel'); //删除标签
Route::get('/query/{id}', 'admin\Tags_mangement@query'); //查询标签

//聂鹏郦
Route::get('/updateLoopInfo', 'admin\Slideshow_mangement\UpdateLoopController@getAllLoop'); //得到所有轮播图数据
Route::post('/searchArticle', 'admin\Slideshow_mangement\UpdateLoopController@searchArticle'); //查找文章
Route::post('/updateLoopInfo', 'admin\Slideshow_mangement\UpdateLoopController@updateLoop'); //修改轮播图成功，保存数据
Route::post('/upImage', 'admin\Slideshow_mangement\UpdateLoopController@UpImage');

//NIYU
Route::get('/getArticleInfo/{id}', "admin\Article_mangement@getArticleInfo"); //获取所有文章
Route::get('/getsoftDeleteInfo', "admin\Article_mangement@getsoftDeleteInfo"); //获取软删除文章
Route::get('/getSearchArticle', "admin\Article_mangement@getSearchArticle"); //搜索文章
Route::post('/postSoftDelete', "admin\Article_mangement@postSoftDelete"); //软删除
Route::post('/postDelete', "admin\Article_mangement@postDelete"); //彻底删除
Route::post('/postRecovr', "admin\Article_mangement@postRecovr"); //恢复软删除
Route::get('/getArticle', "admin\Article_mangement@getArticle"); //审核文章
Route::post('/postPass', "admin\Article_mangement@postPass"); //通过审核
Route::post('/postNotPass', "admin\Article_mangement@postNotPass"); //未通过审核

Route::group(['middleware' => ['IndexLogin']], function () { });

//后台
//郑如缘
Route::get('/getAllUsers', 'admin\User_mangement@getAllUsers'); //获取所有用户信息          !
Route::post('/postAddUser', 'admin\User_mangement@postAddUser'); //新增用户
Route::get('/getResetPass/{id}', 'admin\User_mangement@getResetPass'); //重置密码
Route::post('/postSetStatus/{id}', 'admin\User_mangement@postSetStatus'); //设置用户状态
Route::get('/getSoftDelete/{id}', 'admin\User_mangement@getSoftDelete'); //软删除用户
Route::get('/getRecovery/{id}', 'admin\User_mangement@getRecovery'); //恢复用户
Route::get('/getHardDelete/{id}', 'admin\User_mangement@getHardDelete'); //硬删除用户
Route::get('/getSoftDelUserInfo', 'admin\User_mangement@getSoftDelUserInfo'); //获取被软删除的用户信息
Route::get('/getListInfo/{id}', 'admin\User_mangement@getListInfo'); //获取列表信息

Route::group(["prefix" => 'admin', 'namespace' => 'admin', 'middleware' => ['IndexLogin']], function () { });

Route::post('/picture/updatepicture', 'Picture\PictureUpdateController@updatePicture'); //更新图片
Route::GET('/picture/showpicture/{name}', 'Picture\PictureUpdateController@showPicture');//输出图片
